/**
 * 
 */
package com.celephais.common.client.ui;

import com.google.gwt.user.client.ui.Widget;

/**
 * @author Eugene Shen
 * This is the callback interface used by TDIButtonSet.
 */
public interface TDIButtonSetAction {
	
	/**
	 * This method will be called by TDIButtonSet whenever a button is pressed.
	 * @param index The index of the widget that was pressed.
	 * @param widget The widget that was pressed.
	 */
	public void onClick(int index, Widget widget);
	
	/**
	 * This method will be called by TDIButtonSet when a button is removed.
	 * It is your responsibility to remove the listed Widget from whatever
	 * parent container it is in.
	 * @param index The (original) index of the widget that was removed.
	 * @param widget The widget that was removed.
	 */
	public void onRemove(int index, Widget widget);
}
